<%--
  Created by IntelliJ IDEA.
  User: 123
  Date: 2020/11/22
  Time: 14:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>动物管理系统</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/layui/css/layui.css" media="all">
    <style type="text/css">
        .layui-table-cell .layui-form-checkbox[lay-skin="primary"]{top: 50%;transform: translateY(-50%)}
        .layui-tab-content {
            padding: 0;/*layui-tab-content:默认有padding: 10px;的值，因为iframe的绝对定位脱离文档流，所以会存在20px的空白空间*/
        }
        .show-frame {
            top: 50px!important;
            /*默认.layui-layout-admin .layui-body {
                top: 60px;
                bottom: 44px;
            }*/
            overflow: hidden;/*消除浏览器最右边的滚动条*/
        }
        .frame {
            position: absolute;
            padding: 10px;/*与layui-footer隔开一段距离*/
            width: 100%;
            height: 100%;
        }
    </style>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">动物管理系统</div>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                    贤心
                </a>
            </li>
            <li class="layui-nav-item"><a href="">退出</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:void(0);">学生管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:void(0);" tab_id="1" page_src="AnimalShow.jsp">动物列表</a></dd>
                        <dd><a href="javascript:;"  tab_id="2" page_src="testTable2.jsp">分类列表</a></dd>
                        <dd><a href="javascript:;"  tab_id="3" page_src="testTable3.jsp">科目列表</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">学生管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;">学生列表</a></dd>
                        <dd><a href="javascript:;">成绩列表</a></dd>
                        <dd><a href="javascript:;">科目列表</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <div class="layui-tab" lay-filter="myTab">
            <ul class="layui-tab-title">
                <li class="layui-this">欢迎界面</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">欢迎登陆学生管理系统</div>
            </div>
        </div>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © 版权所有 2007
    </div>
</div>
<script src="layui/layui.js"></script>
<script src="js/jquery-1.11.1.js"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;
        $("dl.layui-nav-child a").click(function(){
            var title=$(this).html();
            var id=$(this).attr("tab_id");
            var page_src=$(this).attr("page_src");
            if($("li[lay-id="+id+"]").size()==0) {
                element.tabAdd("myTab", {
                    title: title,
                        content: "<iframe class='frame' src='"+page_src+"'></iframe>",
                    id: id
                });
            }
            element.tabChange("myTab",id);
        });
    });
</script>

















0
</body>
</html>